public class Test {
    public static void search(int[] array){
        for (int i = 0; i < array.length; i++) {
            int result = 0;
            for (int j = 0; j < array.length; j++) {
                if((j != i) && array[i] == array[j]){
                    result = 1;
                    break;
                }
            }
            if (result == 0) {
                System.out.println(array[i]);
            }
        }
    }
    public static void main(String[] args) {
        int[] array = {1,4,1,4,0};
        search(array);
    }
}
